package com.onepunch.common;

public class BusinessException  extends RuntimeException{
    private int code;// 错误码（如1001代表参数错误）
    private String message; // 错误信息

    // 构造方法：传入错误码和信息
    public BusinessException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
